﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XL.Crawler.Core.Crawlers.CrawlerEventArgs
{
    /// <summary>
    /// 异常事件参数
    /// </summary>
    public class ExceptionEventArgs : EventArgs
    {
        /// <summary>
        /// 异常时间
        /// </summary>
        internal DateTimeOffset DateTime { get; }
        /// <summary>
        /// 异常
        /// </summary>
        public Exception Exception { get; set; } = default!;
        /// <summary>
        /// 异常消息
        /// </summary>
        public string Message { get; set; } = default!;
        /// <summary>
        /// 构造
        /// </summary>
        public ExceptionEventArgs()
        {
            DateTime = DateTimeOffset.Now;
        }
    }
}
